﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="WenZhang edit.aspx.cs" Inherits="WenZhang_edit" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
    <script src ="../ckeditor/ckeditor.js"type="text/javascript"></script>
</head>
<body>
    <form id="form1" runat="server" action="/admin/inc/news_edit.ashx">
    <div>
        <%
            
            int id = int.Parse(Request.QueryString["id"].ToString());
            JLL.Model.News news = JLL.BLL.News.Getnews(id);
            
             %>
        <table border ="1" align="center" width="80%" >
            <tr ><td >文章标题</td><td >
                <input id="title" name ="title" type="text" value ="<%=news.Title %>" style="width:500px" /></td></tr>
            <tr ><td >文章类别</td><td >
                <select id="menu" name="menu">
                    <%
                        List<JLL.Model.Menu> list = JLL.BLL.Menu.list();
                        for (int i=0;i<list.Count;i++)
                        {
                         %>
                    <option value="<%=list[i].Id%>"><%=list[i].Title%></option>
                    <%} %>
                </select></td></tr>
            <tr ><td >文章内容</td><td >
                <textarea id="TextArea1" cols="20" name="S1" rows="2"><%=news.More%></textarea></td></tr>
            <tr ><td >文章状态</td><td >
                <select id="state" name="state">
                    <option value="1">正常</option>
                    <option value="0">关闭</option>
                </select></td></tr>
            <tr ><td ></td><td >
                <input type ="hidden" name="id" id="id" value="<%=news.Id%>" />
                <input id="Button1" type="submit" value="保存" />
                </td></tr>
        </table>
    </div>

    <script type="text/javascript">

        document.getElementById("menu").value=<%=news.Menu.Id%>;
        document.getElementById("state").value=<%=news.State%>;

    </script>

    </form>
</body>
</html>
